Learn R Programming

MTurkR (version 0.6.17)

Blocking Workers: Block/Unblock Worker(s)

Description

Block or unblock a worker. This prevents a worker from completing any HITs for you while they are blocked, but does not affect their ability to complete work for other requesters or affect their worker statistics. GetBlockedWorkers retrieves your list of currently blocked workers.

Usage

BlockWorker(workers, reasons, verbose = getOption('MTurkR.verbose', TRUE), ...)

UnblockWorker(workers, reasons = NULL, verbose = getOption('MTurkR.verbose', TRUE), ...)

GetBlockedWorkers(pagenumber = NULL, pagesize = NULL, 
                  verbose = getOption('MTurkR.verbose', TRUE), ...)

Arguments

workers
A character string containing a WorkerId, or a vector of character strings containing multiple WorkerIds.
reasons
A character string containing a reason for blocking or unblocking a worker. This must have length 1 or length equal to the number of workers. It is required for BlockWorker and optional for UnblockWorker.
pagenumber
An optional integer (or character string) indicating which page of Blocked Workers search results should be returned. Most users can ignore this.
pagesize
An optional integer (or character string) indicating how many Blocked Workers should be returned per page of results. Most users can ignore this and the function will return the first 65,535 blocks.
verbose
Optionally print the results of the API request to the standard output. Default is taken from getOption('MTurkR.verbose', TRUE).
...
Additional arguments passed to request.

Value

  • BlockWorker and UnblockWorker return a dataframe containing the list of workers, reasons (for blocking/unblocking them), and whether the request to block/unblock each of them was valid. GetBlockedWorkers returns a dataframe containing the list of blocked workers and the recorded reason for the block.

Details

BlockWorker prevents the specified worker from completing any of your HITs. UnblockWorker reverses this operation. GetBlockedWorkers retrieves currently blocked workers and the reason recorded for their block. This operation returns the first 65,535 blocked workers (the default for pagesize; access to additional blocked workers is available by specifying a pagenumber greater than 1. BlockWorkers() and block() are aliases for BlockWorker. UnblockWorkers() and unblock() are aliases for UnblockWorker. blockedworkers() is an alias for GetBlockedWorkers.

References

http://docs.amazonwebservices.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_BlockWorkerOperation.html{API Reference: Block} http://docs.amazonwebservices.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_UnblockWorkerOperation.html{API Reference: Unblock} http://docs.amazonwebservices.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_GetBlockedWorkersOperation.html{API Reference: GetBlockedWorkers}

Examples

Run this code
BlockWorker(worker, reasons="Did not follow photo categorization HIT instructions.")
GetBlockedWorkers()
UnblockWorker(worker)

Run the code above in your browser using DataLab